package com.yy.module.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import org.hibernate.annotations.GenericGenerator;
import com.yy.base.common.entity.BaseEntity;

/**
 * 模块查询字段表
 */
@Entity
@Table(name="t_module_query")
public class ModuleQueryField extends BaseEntity {
	private String id;
	private String moduleId;//模块ID
	private String tableId;//表ID
	private String tableName;//表说明名
	private String fieldName;//字段名，如：name
	private String name;//显示名称
	private Integer isHide = 0;//是否隐藏
	private Integer isNotNull = 0;//是否不能为空，1：是，0：否
	private Integer isRange = 0;//是否范围选项，1：是，0：否
	private String type;//输入框类型，text,select,textarea,date,tree,open
	private String options;//选项list json 格式
	private String defaultValue;//默认值
	private String format;//数据格式
	private String queryField;//查询ID，多个选项同一个时，合并查询条件(适用于模糊查询)
	private Integer orderBy = 10;//排序
	private String remark;//

	@Id
	@Column(name="ID", length = 32, nullable = false)
    @GeneratedValue(generator = "uuid2" )//指定生成器名称
    @GenericGenerator(name = "uuid2", strategy = "org.hibernate.id.UUIDGenerator" )
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getModuleId() {
		return moduleId;
	}
	public void setModuleId(String moduleId) {
		this.moduleId = moduleId;
	}
	public String getTableId() {
		return tableId;
	}
	public void setTableId(String tableId) {
		this.tableId = tableId;
	}
	@Transient
	public String getTableName() {
		return tableName;
	}
	public void setTableName(String tableName) {
		this.tableName = tableName;
	}
	public String getFieldName() {
		return fieldName;
	}
	public void setFieldName(String fieldName) {
		this.fieldName = fieldName;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Integer getIsHide() {
		return isHide;
	}
	public void setIsHide(Integer isHide) {
		this.isHide = isHide;
	}
	public Integer getIsNotNull() {
		return isNotNull;
	}
	public void setIsNotNull(Integer isNotNull) {
		this.isNotNull = isNotNull;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getOptions() {
		return options;
	}
	public void setOptions(String options) {
		this.options = options;
	}
	public String getDefaultValue() {
		return defaultValue;
	}
	public void setDefaultValue(String defaultValue) {
		this.defaultValue = defaultValue;
	}
	public String getFormat() {
		return format;
	}
	public void setFormat(String format) {
		this.format = format;
	}
	public Integer getIsRange() {
		return isRange;
	}
	public void setIsRange(Integer isRange) {
		this.isRange = isRange;
	}
	public String getQueryField() {
		return queryField;
	}
	public void setQueryField(String queryField) {
		this.queryField = queryField;
	}
	public Integer getOrderBy() {
		return orderBy;
	}
	public void setOrderBy(Integer orderBy) {
		this.orderBy = orderBy;
	}
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
}